<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>首页</title>
    <link href="../plugin/bootstrap-3.3.7-dist/css/bootstrap.css" rel="stylesheet" type="text/css"/>
    <script type="text/javascript" src="../plugin/jquery/jquery-3.5.1.min.js"></script>
    <script type="text/javascript" src="../plugin/bootstrap-3.3.7-dist/js/bootstrap.js"></script>
    <script type="text/javascript" src="../plugin/layer/layer.js"></script>
    <script type="text/javascript" src="../base.js"></script>
    <style>
        button {
            margin-left: 10px;
        }

        .form {
            display: flex;
            flex-wrap: wrap;
            justify-content: center;
        }
    </style>
</head>
<body>

<div style="margin:20px 0 10px 100px">
    <button type="button" style="padding-left:10px" class="btn btn-primary" onclick="toSell()">售卖市场</button>
    <button type="button" style="margin-left:20px" class="btn btn-primary" onclick="toBuy()">求购市场</button>
    <button type="button" style="margin-left: 20px" onclick="calcuate()" class="btn btn-primary">计算总价格</button>
    <button id='yuankuangbtn' onclick="showTable('yuankuang', 'yuankuangbtn')"class="btn btn-default" style="margin-left:20px">原矿</button>
    <button id='kuangwubtn' onclick="showTable('kuangwu','kuangwubtn')" class="btn btn-default" style="margin-left:20px">矿物</button>
    <button id='xxclbtn'  onclick="showTable('xxcl','xxclbtn')" style="margin-left: 20px;" class="btn btn-default">行星材料</button>
    <button id='fkbtn' onclick="showTable('fk', 'fkbtn')" style="margin-left: 20px;" class="btn btn-default" >富矿</button>
</div>
<div style="margin: 10px 100px 0 100px; text-align: center;">
    <div id="yuankuang" style="display: none">
        <label style="margin-left:90px">原矿</label>
        <table class="table table-bordered table-condensed table-striped" >
            <tr class="col-xs-14">
                <td>凡晶石</td>
                <td>数量：<input type="text" class="form-control input-sm" value=""></td>
                <td>价格：<input type="text" class="form-control input-sm" value=""></td>
                <td>单位：<select class="form-control input-sm">
                    <option value="1">个</option>
                    <option value="2">千个</option>
                    <option value="3">百万个</option>
                </select>
                </td>
            </tr>
            <tr class="col-xs-14">
                <td>灼烧岩</td>
                <td><input type="text" class="form-control input-sm" value=""></td>
                <td><input type="text" class="form-control input-sm" value=""></td>
                <td><select class="form-control input-sm">
                    <option value="1">个</option>
                    <option value="2">千个</option>
                    <option value="3">百万个</option>
                </select>
                </td>
            </tr>
            <tr class="col-xs-14">
                <td>干焦岩</td>
                <td><input type="text" class="form-control input-sm" value=""></td>
                <td><input type="text" class="form-control input-sm" value=""></td>
                <td><select class="form-control input-sm">
                    <option value="1">个</option>
                    <option value="2">千个</option>
                    <option value="3">百万个</option>
                </select>
                </td>
            </tr>
            <tr class="col-xs-14">
                <td>斜长岩</td>
                <td><input type="text" class="form-control input-sm" value=""></td>
                <td><input type="text" class="form-control input-sm" value=""></td>
                <td><select class="form-control input-sm">
                    <option value="1">个</option>
                    <option value="2">千个</option>
                    <option value="3">百万个</option>
                </select>
                </td>
            </tr>
            <tr class="col-xs-14">
                <td>奥贝尔石</td>
                <td><input type="text" class="form-control input-sm" value=""></td>
                <td><input type="text" class="form-control input-sm" value=""></td>
                <td><select class="form-control input-sm">
                    <option value="1">个</option>
                    <option value="2">千个</option>
                    <option value="3">百万个</option>
                </select>
                </td>
            </tr>
            <tr class="col-xs-14">
                <td>水硼砂</td>
                <td><input type="text" class="form-control input-sm" value=""></td>
                <td><input type="text" class="form-control input-sm" value=""></td>
                <td><select class="form-control input-sm">
                    <option value="1">个</option>
                    <option value="2">千个</option>
                    <option value="3">百万个</option>
                </select>
                </td>
            </tr>
            <tr class="col-xs-14">
                <td>杰斯贝矿</td>
                <td><input type="text" class="form-control input-sm" value=""></td>
                <td><input type="text" class="form-control input-sm" value=""></td>
                <td><select class="form-control input-sm">
                    <option value="1">个</option>
                    <option value="2">千个</option>
                    <option value="3">百万个</option>
                </select>
                </td>
            </tr>
            <tr class="col-xs-14">
                <td>希莫非特</td>
                <td><input type="text" class="form-control input-sm" value=""></td>
                <td><input type="text" class="form-control input-sm" value=""></td>
                <td><select class="form-control input-sm">
                    <option value="1">个</option>
                    <option value="2">千个</option>
                    <option value="3">百万个</option>
                </select>
                </td>
            </tr>
            <tr class="col-xs-14">
                <td>同位原矿</td>
                <td><input type="text" class="form-control input-sm" value=""></td>
                <td><input type="text" class="form-control input-sm" value=""></td>
                <td><select class="form-control input-sm">
                    <option value="1">个</option>
                    <option value="2">千个</option>
                    <option value="3">百万个</option>
                </select>
                </td>
            </tr>
            <tr class="col-xs-14">
                <td>灰岩</td>
                <td><input type="text" class="form-control input-sm" value=""></td>
                <td><input type="text" class="form-control input-sm" value=""></td>
                <td><select class="form-control input-sm">
                    <option value="1">个</option>
                    <option value="2">千个</option>
                    <option value="3">百万个</option>
                </select>
                </td>
            </tr>
            <tr class="col-xs-14">
                <td>黑褚石</td>
                <td><input type="text" class="form-control input-sm" value=""></td>
                <td><input type="text" class="form-control input-sm" value=""></td>
                <td><select class="form-control input-sm">
                    <option value="1">个</option>
                    <option value="2">千个</option>
                    <option value="3">百万个</option>
                </select>
                </td>
            </tr>
            <tr class="col-xs-14">
                <td>片麻岩</td>
                <td><input type="text" class="form-control input-sm" value=""></td>
                <td><input type="text" class="form-control input-sm" value=""></td>
                <td><select class="form-control input-sm">
                    <option value="1">个</option>
                    <option value="2">千个</option>
                    <option value="3">百万个</option>
                </select>
                </td>
            </tr>
            <tr class="col-xs-14">
                <td>克洛基石</td>
                <td><input type="text" class="form-control input-sm" value=""></td>
                <td><input type="text" class="form-control input-sm" value=""></td>
                <td><select class="form-control input-sm">
                    <option value="1">个</option>
                    <option value="2">千个</option>
                    <option value="3">百万个</option>
                </select>
                </td>
            </tr>
            <tr class="col-xs-14">
                <td>双多特石</td>
                <td><input type="text" class="form-control input-sm" value=""></td>
                <td><input type="text" class="form-control input-sm" value=""></td>
                <td><select class="form-control input-sm">
                    <option value="1">个</option>
                    <option value="2">千个</option>
                    <option value="3">百万个</option>
                </select>
                </td>
            </tr>
            <tr class="col-xs-14">
                <td>艾克诺石</td>
                <td><input type="text" class="form-control input-sm" value=""></td>
                <td><input type="text" class="form-control input-sm" value=""></td>
                <td><select class="form-control input-sm">
                    <option value="1">个</option>
                    <option value="2">千个</option>
                    <option value="3">百万个</option>
                </select>
                </td>
            </tr>
            <tr class="col-xs-14">
                <td>基腹断岩</td>
                <td><input type="text" class="form-control input-sm" value=""></td>
                <td><input type="text" class="form-control input-sm" value=""></td>
                <td><select class="form-control input-sm">
                    <option value="1">个</option>
                    <option value="2">千个</option>
                    <option value="3">百万个</option>
                </select>
                </td>
            </tr>
        </table>
    </div>

    <div id="kuangwu" style="display: none">
        <label style="margin-left:90px">矿物</label>
        <table class="table table-bordered table-condensed table-striped" >
            <tr class="col-xs-14">
                <td>三钛合金</td>
                <td>数量：<input type="text" class="form-control input-sm" value=""></td>
                <td>价格：<input type="text" class="form-control input-sm" value=""></td>
                <td>单位：<select class="form-control input-sm">
                    <option value="1">个</option>
                    <option value="2">千个</option>
                    <option value="3">百万个</option>
                </select>
                </td>
            </tr>
            <tr class="col-xs-14">
                <td>类晶体胶矿</td>
                <td><input type="text" class="form-control input-sm" value=""></td>
                <td><input type="text" class="form-control input-sm" value=""></td>
                <td><select class="form-control input-sm">
                    <option value="1">个</option>
                    <option value="2">千个</option>
                    <option value="3">百万个</option>
                </select>
                </td>
            </tr>
            <tr class="col-xs-14">
                <td>同位聚合体</td>
                <td><input type="text" class="form-control input-sm" value=""></td>
                <td><input type="text" class="form-control input-sm" value=""></td>
                <td><select class="form-control input-sm">
                    <option value="1">个</option>
                    <option value="2">千个</option>
                    <option value="3">百万个</option>
                </select>
                </td>
            </tr>
            <tr class="col-xs-14">
                <td>超新星诺克石</td>
                <td><input type="text" class="form-control input-sm" value=""></td>
                <td><input type="text" class="form-control input-sm" value=""></td>
                <td><select class="form-control input-sm">
                    <option value="1">个</option>
                    <option value="2">千个</option>
                    <option value="3">百万个</option>
                </select>
                </td>
            </tr>
            <tr class="col-xs-14">
                <td>晶状石英核岩</td>
                <td><input type="text" class="form-control input-sm" value=""></td>
                <td><input type="text" class="form-control input-sm" value=""></td>
                <td><select class="form-control input-sm">
                    <option value="1">个</option>
                    <option value="2">千个</option>
                    <option value="3">百万个</option>
                </select>
                </td>
            </tr>
            <tr class="col-xs-14">
                <td>超啮矿</td>
                <td><input type="text" class="form-control input-sm" value=""></td>
                <td><input type="text" class="form-control input-sm" value=""></td>
                <td><select class="form-control input-sm">
                    <option value="1">个</option>
                    <option value="2">千个</option>
                    <option value="3">百万个</option>
                </select>
                </td>
            </tr>
            <tr class="col-xs-14">
                <td>莫尔石</td>
                <td><input type="text" class="form-control input-sm" value=""></td>
                <td><input type="text" class="form-control input-sm" value=""></td>
                <td><select class="form-control input-sm">
                    <option value="1">个</option>
                    <option value="2">千个</option>
                    <option value="3">百万个</option>
                </select>
                </td>
            </tr>
        </table>
    </div>

    <div id="xxcl" style="display: none">
        <label style="margin-left: 90px;">行星材料</label>
        <table class="table table-bordered table-condensed table-striped" >
            <tr class="col-xs-14">
                <td>光泽和金
                    <button class="btn btn-primary" onclick="showPerfect(1)">产量top5</button>
                </td>
                <td>数量：<input type="text" class="form-control input-sm" value=""></td>
                <td>价格：<input type="text" class="form-control input-sm" value=""></td>
                <td>单位：<select class="form-control input-sm">
                    <option value="1">个</option>
                    <option value="2">千个</option>
                    <option value="3">百万个</option>
                </select>
                </td>
            </tr>
            <tr class="col-xs-14">
                <td>光彩合金
                    <button class="btn btn-primary" onclick="showPerfect(2)">产量top5</button>
                </td>
                <td><input type="text" class="form-control input-sm" value=""></td>
                <td><input type="text" class="form-control input-sm" value=""></td>
                <td><select class="form-control input-sm">
                    <option value="1">个</option>
                    <option value="2">千个</option>
                    <option value="3">百万个</option>
                </select>
                </td>
            </tr>
            <tr class="col-xs-14">
                <td>闪光合金
                    <button class="btn btn-primary" onclick="showPerfect(3)">产量top5</button>
                </td>
                <td><input type="text" class="form-control input-sm" value=""></td>
                <td><input type="text" class="form-control input-sm" value=""></td>
                <td><select class="form-control input-sm">
                    <option value="1">个</option>
                    <option value="2">千个</option>
                    <option value="3">百万个</option>
                </select>
                </td>
            </tr>
            <tr class="col-xs-14">
                <td>浓缩合金
                    <button class="btn btn-primary" onclick="showPerfect(4)">产量top5</button>
                </td>
                <td><input type="text" class="form-control input-sm" value=""></td>
                <td><input type="text" class="form-control input-sm" value=""></td>
                <td><select class="form-control input-sm">
                    <option value="1">个</option>
                    <option value="2">千个</option>
                    <option value="3">百万个</option>
                </select>
                </td>
            </tr>
            <tr class="col-xs-14">
                <td>精密合金
                    <button class="btn btn-primary" onclick="showPerfect(5)">产量top5</button>
                </td>
                <td><input type="text" class="form-control input-sm" value=""></td>
                <td><input type="text" class="form-control input-sm" value=""></td>
                <td><select class="form-control input-sm">
                    <option value="1">个</option>
                    <option value="2">千个</option>
                    <option value="3">百万个</option>
                </select>
                </td>
            </tr>
            <tr class="col-xs-14">
                <td>杂色复合物
                    <button class="btn btn-primary" onclick="showPerfect(6)">产量top5</button>
                </td>
                <td><input type="text" class="form-control input-sm" value=""></td>
                <td><input type="text" class="form-control input-sm" value=""></td>
                <td><select class="form-control input-sm">
                    <option value="1">个</option>
                    <option value="2">千个</option>
                    <option value="3">百万个</option>
                </select>
                </td>
            </tr>
            <tr class="col-xs-14">
                <td>纤维复合物
                    <button class="btn btn-primary" onclick="showPerfect(7)">产量top5</button>
                </td>
                <td><input type="text" class="form-control input-sm" value=""></td>
                <td><input type="text" class="form-control input-sm" value=""></td>
                <td><select class="form-control input-sm">
                    <option value="1">个</option>
                    <option value="2">千个</option>
                    <option value="3">百万个</option>
                </select>
                </td>
            </tr>
            <tr class="col-xs-14">
                <td>透光复合物
                    <button class="btn btn-primary" onclick="showPerfect(8)">产量top5</button>
                </td>
                <td><input type="text" class="form-control input-sm" value=""></td>
                <td><input type="text" class="form-control input-sm" value=""></td>
                <td><select class="form-control input-sm">
                    <option value="1">个</option>
                    <option value="2">千个</option>
                    <option value="3">百万个</option>
                </select>
                </td>
            </tr>
            <tr class="col-xs-14">
                <td>多样复合物
                    <button class="btn btn-primary" onclick="showPerfect(9)">产量top5</button>
                </td>
                <td><input type="text" class="form-control input-sm" value=""></td>
                <td><input type="text" class="form-control input-sm" value=""></td>
                <td><select class="form-control input-sm">
                    <option value="1">个</option>
                    <option value="2">千个</option>
                    <option value="3">百万个</option>
                </select>
                </td>
            </tr>
            <tr class="col-xs-14">
                <td>光滑复合物
                    <button class="btn btn-primary" onclick="showPerfect(10)">产量top5</button>
                </td>
                <td><input type="text" class="form-control input-sm" value=""></td>
                <td><input type="text" class="form-control input-sm" value=""></td>
                <td><select class="form-control input-sm">
                    <option value="1">个</option>
                    <option value="2">千个</option>
                    <option value="3">百万个</option>
                </select>
                </td>
            </tr>
            <tr class="col-xs-14">
                <td>晶体复合物
                    <button class="btn btn-primary" onclick="showPerfect(11)">产量top5</button>
                </td>
                <td><input type="text" class="form-control input-sm" value=""></td>
                <td><input type="text" class="form-control input-sm" value=""></td>
                <td><select class="form-control input-sm">
                    <option value="1">个</option>
                    <option value="2">千个</option>
                    <option value="3">百万个</option>
                </select>
                </td>
            </tr>
            <tr class="col-xs-14">
                <td>黑暗复合物
                    <button class="btn btn-primary" onclick="showPerfect(12)">产量top5</button>
                </td>
                <td><input type="text" class="form-control input-sm" value=""></td>
                <td><input type="text" class="form-control input-sm" value=""></td>
                <td><select class="form-control input-sm">
                    <option value="1">个</option>
                    <option value="2">千个</option>
                    <option value="3">百万个</option>
                </select>
                </td>
            </tr>
            <tr class="col-xs-14">
                <td>活性气体
                    <button class="btn btn-primary" onclick="showPerfect(13)">产量top5</button>
                </td>
                <td><input type="text" class="form-control input-sm" value=""></td>
                <td><input type="text" class="form-control input-sm" value=""></td>
                <td><select class="form-control input-sm">
                    <option value="1">个</option>
                    <option value="2">千个</option>
                    <option value="3">百万个</option>
                </select>
                </td>
            </tr>
            <tr class="col-xs-14">
                <td>稀有气体
                    <button class="btn btn-primary" onclick="showPerfect(14)">产量top5</button>
                </td>
                <td><input type="text" class="form-control input-sm" value=""></td>
                <td><input type="text" class="form-control input-sm" value=""></td>
                <td><select class="form-control input-sm">
                    <option value="1">个</option>
                    <option value="2">千个</option>
                    <option value="3">百万个</option>
                </select>
                </td>
            </tr>
            <tr class="col-xs-14">
                <td>基础金属
                    <button class="btn btn-primary" onclick="showPerfect(15)">产量top5</button>
                </td>
                <td><input type="text" class="form-control input-sm" value=""></td>
                <td><input type="text" class="form-control input-sm" value=""></td>
                <td><select class="form-control input-sm">
                    <option value="1">个</option>
                    <option value="2">千个</option>
                    <option value="3">百万个</option>
                </select>
                </td>
            </tr>
            <tr class="col-xs-14">
                <td>重金属
                    <button class="btn btn-primary" onclick="showPerfect(16)">产量top5</button>
                </td>
                <td><input type="text" class="form-control input-sm" value=""></td>
                <td><input type="text" class="form-control input-sm" value=""></td>
                <td><select class="form-control input-sm">
                    <option value="1">个</option>
                    <option value="2">千个</option>
                    <option value="3">百万个</option>
                </select>
                </td>
            </tr>
            <tr class="col-xs-14">
                <td>贵金属
                    <button class="btn btn-primary" onclick="showPerfect(17)">产量top5</button>
                </td>
                <td><input type="text" class="form-control input-sm" value=""></td>
                <td><input type="text" class="form-control input-sm" value=""></td>
                <td><select class="form-control input-sm">
                    <option value="1">个</option>
                    <option value="2">千个</option>
                    <option value="3">百万个</option>
                </select>
                </td>
            </tr>
            <tr class="col-xs-14">
                <td>反应金属
                    <button class="btn btn-primary" onclick="showPerfect(18)">产量top5</button>
                </td>
                <td><input type="text" class="form-control input-sm" value=""></td>
                <td><input type="text" class="form-control input-sm" value=""></td>
                <td><select class="form-control input-sm">
                    <option value="1">个</option>
                    <option value="2">千个</option>
                    <option value="3">百万个</option>
                </select>
                </td>
            </tr>
            <tr class="col-xs-14">
                <td>有毒金属
                    <button class="btn btn-primary" onclick="showPerfect(19)">产量top5</button>
                </td>
                <td><input type="text" class="form-control input-sm" value=""></td>
                <td><input type="text" class="form-control input-sm" value=""></td>
                <td><select class="form-control input-sm">
                    <option value="1">个</option>
                    <option value="2">千个</option>
                    <option value="3">百万个</option>
                </select>
                </td>
            </tr>
            <tr class="col-xs-14">
                <td>工业纤维
                    <button class="btn btn-primary" onclick="showPerfect(20)">产量top5</button>
                </td>
                <td><input type="text" class="form-control input-sm" value=""></td>
                <td><input type="text" class="form-control input-sm" value=""></td>
                <td><select class="form-control input-sm">
                    <option value="1">个</option>
                    <option value="2">千个</option>
                    <option value="3">百万个</option>
                </select>
                </td>
            </tr>
            <tr class="col-xs-14">
                <td>超张力塑料
                    <button class="btn btn-primary" onclick="showPerfect(21)">产量top5</button>
                </td>
                <td><input type="text" class="form-control input-sm" value=""></td>
                <td><input type="text" class="form-control input-sm" value=""></td>
                <td><select class="form-control input-sm">
                    <option value="1">个</option>
                    <option value="2">千个</option>
                    <option value="3">百万个</option>
                </select>
                </td>
            </tr>
            <tr class="col-xs-14">
                <td>聚芳酰胺
                    <button class="btn btn-primary" onclick="showPerfect(22)">产量top5</button>
                </td>
                <td><input type="text" class="form-control input-sm" value=""></td>
                <td><input type="text" class="form-control input-sm" value=""></td>
                <td><select class="form-control input-sm">
                    <option value="1">个</option>
                    <option value="2">千个</option>
                    <option value="3">百万个</option>
                </select>
                </td>
            </tr>
            <tr class="col-xs-14">
                <td>冷却剂
                    <button class="btn btn-primary" onclick="showPerfect(23)">产量top5</button>
                </td>
                <td><input type="text" class="form-control input-sm" value=""></td>
                <td><input type="text" class="form-control input-sm" value=""></td>
                <td><select class="form-control input-sm">
                    <option value="1">个</option>
                    <option value="2">千个</option>
                    <option value="3">百万个</option>
                </select>
                </td>
            </tr>
            <tr class="col-xs-14">
                <td>凝缩液
                    <button class="btn btn-primary" onclick="showPerfect(24)">产量top5</button>
                </td>
                <td><input type="text" class="form-control input-sm" value=""></td>
                <td><input type="text" class="form-control input-sm" value=""></td>
                <td><select class="form-control input-sm">
                    <option value="1">个</option>
                    <option value="2">千个</option>
                    <option value="3">百万个</option>
                </select>
                </td>
            </tr>
            <tr class="col-xs-14">
                <td>建筑模块
                    <button class="btn btn-primary" onclick="showPerfect(25)">产量top5</button>
                </td>
                <td><input type="text" class="form-control input-sm" value=""></td>
                <td><input type="text" class="form-control input-sm" value=""></td>
                <td><select class="form-control input-sm">
                    <option value="1">个</option>
                    <option value="2">千个</option>
                    <option value="3">百万个</option>
                </select>
                </td>
            </tr>
            <tr class="col-xs-14">
                <td>纳米体
                    <button class="btn btn-primary" onclick="showPerfect(26)">产量top5</button>
                </td>
                <td><input type="text" class="form-control input-sm" value=""></td>
                <td><input type="text" class="form-control input-sm" value=""></td>
                <td><select class="form-control input-sm">
                    <option value="1">个</option>
                    <option value="2">千个</option>
                    <option value="3">百万个</option>
                </select>
                </td>
            </tr>
            <tr class="col-xs-14">
                <td>硅结构铸材
                    <button class="btn btn-primary" onclick="showPerfect(27)">产量top5</button>
                </td>
                <td><input type="text" class="form-control input-sm" value=""></td>
                <td><input type="text" class="form-control input-sm" value=""></td>
                <td><select class="form-control input-sm">
                    <option value="1">个</option>
                    <option value="2">千个</option>
                    <option value="3">百万个</option>
                </select>
                </td>
            </tr>
            <tr class="col-xs-14">
                <td>灵巧单元建筑模块
                    <button class="btn btn-primary" onclick="showPerfect(28)">产量top5</button>
                </td>
                <td><input type="text" class="form-control input-sm" value=""></td>
                <td><input type="text" class="form-control input-sm" value=""></td>
                <td><select class="form-control input-sm">
                    <option value="1">个</option>
                    <option value="2">千个</option>
                    <option value="3">百万个</option>
                </select>
                </td>
            </tr>
            <tr class="col-xs-14">
                <td>重水
                    <button class="btn btn-primary" onclick="showPerfect(29)">产量top5</button>
                </td>
                <td><input type="text" class="form-control input-sm" value=""></td>
                <td><input type="text" class="form-control input-sm" value=""></td>
                <td><select class="form-control input-sm">
                    <option value="1">个</option>
                    <option value="2">千个</option>
                    <option value="3">百万个</option>
                </select>
                </td>
            </tr>
            <tr class="col-xs-14">
                <td>悬浮等离子
                    <button class="btn btn-primary" onclick="showPerfect(30)">产量top5</button>
                </td>
                <td><input type="text" class="form-control input-sm" value=""></td>
                <td><input type="text" class="form-control input-sm" value=""></td>
                <td><select class="form-control input-sm">
                    <option value="1">个</option>
                    <option value="2">千个</option>
                    <option value="3">百万个</option>
                </select>
                </td>
            </tr>
            <tr class="col-xs-14">
                <td>液化臭氧
                    <button class="btn btn-primary" onclick="showPerfect(31)">产量top5</button>
                </td>
                <td><input type="text" class="form-control input-sm" value=""></td>
                <td><input type="text" class="form-control input-sm" value=""></td>
                <td><select class="form-control input-sm">
                    <option value="1">个</option>
                    <option value="2">千个</option>
                    <option value="3">百万个</option>
                </select>
                </td>
            </tr>
            <tr class="col-xs-14">
                <td>离子溶液
                    <button class="btn btn-primary" onclick="showPerfect(32)">产量top5</button>
                </td>
                <td><input type="text" class="form-control input-sm" value=""></td>
                <td><input type="text" class="form-control input-sm" value=""></td>
                <td><select class="form-control input-sm">
                    <option value="1">个</option>
                    <option value="2">千个</option>
                    <option value="3">百万个</option>
                </select>
                </td>
            </tr>
            <tr class="col-xs-14">
                <td>同位素燃料
                    <button class="btn btn-primary" onclick="showPerfect(33)">产量top5</button>
                </td>
                <td><input type="text" class="form-control input-sm" value=""></td>
                <td><input type="text" class="form-control input-sm" value=""></td>
                <td><select class="form-control input-sm">
                    <option value="1">个</option>
                    <option value="2">千个</option>
                    <option value="3">百万个</option>
                </select>
                </td>
            </tr>
            <tr class="col-xs-14">
                <td>等离子体团
                    <button class="btn btn-primary" onclick="showPerfect(34)">产量top5</button>
                </td>
                <td><input type="text" class="form-control input-sm" value=""></td>
                <td><input type="text" class="form-control input-sm" value=""></td>
                <td><select class="form-control input-sm">
                    <option value="1">个</option>
                    <option value="2">千个</option>
                    <option value="3">百万个</option>
                </select>
                </td>
            </tr>
        </table>
    </div>

    <div id="fk" style="display: none">
        <label style="margin-left: 90px;">富矿</label>
        <table class="table table-bordered table-condensed table-striped" >
            <tr class="col-xs-14">
                <td>富凡晶石</td>
                <td><input type="text" class="form-control input-sm" value=""></td>
                <td><input type="text" class="form-control input-sm" value=""></td>
                <td><select class="form-control input-sm">
                    <option value="1">个</option>
                    <option value="2">千个</option>
                    <option value="3">百万个</option>
                </select>
                </td>
            </tr>
            <tr class="col-xs-14">
                <td>聚合凡晶石</td>
                <td><input type="text" class="form-control input-sm" value=""></td>
                <td><input type="text" class="form-control input-sm" value=""></td>
                <td><select class="form-control input-sm">
                    <option value="1">个</option>
                    <option value="2">千个</option>
                    <option value="3">百万个</option>
                </select>
                </td>
            </tr>
            <tr class="col-xs-14">
                <td>富灼烧岩</td>
                <td><input type="text" class="form-control input-sm" value=""></td>
                <td><input type="text" class="form-control input-sm" value=""></td>
                <td><select class="form-control input-sm">
                    <option value="1">个</option>
                    <option value="2">千个</option>
                    <option value="3">百万个</option>
                </select>
                </td>
            </tr>
            <tr class="col-xs-14">
                <td>聚合灼烧岩</td>
                <td><input type="text" class="form-control input-sm" value=""></td>
                <td><input type="text" class="form-control input-sm" value=""></td>
                <td><select class="form-control input-sm">
                    <option value="1">个</option>
                    <option value="2">千个</option>
                    <option value="3">百万个</option>
                </select>
                </td>
            </tr>
            <tr class="col-xs-14">
                <td>富干焦岩</td>
                <td><input type="text" class="form-control input-sm" value=""></td>
                <td><input type="text" class="form-control input-sm" value=""></td>
                <td><select class="form-control input-sm">
                    <option value="1">个</option>
                    <option value="2">千个</option>
                    <option value="3">百万个</option>
                </select>
                </td>
            </tr>
            <tr class="col-xs-14">
                <td>聚合干焦岩</td>
                <td><input type="text" class="form-control input-sm" value=""></td>
                <td><input type="text" class="form-control input-sm" value=""></td>
                <td><select class="form-control input-sm">
                    <option value="1">个</option>
                    <option value="2">千个</option>
                    <option value="3">百万个</option>
                </select>
                </td>
            </tr>
            <tr class="col-xs-14">
                <td>富斜长岩</td>
                <td><input type="text" class="form-control input-sm" value=""></td>
                <td><input type="text" class="form-control input-sm" value=""></td>
                <td><select class="form-control input-sm">
                    <option value="1">个</option>
                    <option value="2">千个</option>
                    <option value="3">百万个</option>
                </select>
                </td>
            </tr>
            <tr class="col-xs-14">
                <td>聚合斜长岩</td>
                <td><input type="text" class="form-control input-sm" value=""></td>
                <td><input type="text" class="form-control input-sm" value=""></td>
                <td><select class="form-control input-sm">
                    <option value="1">个</option>
                    <option value="2">千个</option>
                    <option value="3">百万个</option>
                </select>
                </td>
            </tr>
            <tr class="col-xs-14">
                <td>富奥贝尔石</td>
                <td><input type="text" class="form-control input-sm" value=""></td>
                <td><input type="text" class="form-control input-sm" value=""></td>
                <td><select class="form-control input-sm">
                    <option value="1">个</option>
                    <option value="2">千个</option>
                    <option value="3">百万个</option>
                </select>
                </td>
            </tr>
            <tr class="col-xs-14">
                <td>聚合奥贝尔石</td>
                <td><input type="text" class="form-control input-sm" value=""></td>
                <td><input type="text" class="form-control input-sm" value=""></td>
                <td><select class="form-control input-sm">
                    <option value="1">个</option>
                    <option value="2">千个</option>
                    <option value="3">百万个</option>
                </select>
                </td>
            </tr>
            <tr class="col-xs-14">
                <td>富水硼砂</td>
                <td><input type="text" class="form-control input-sm" value=""></td>
                <td><input type="text" class="form-control input-sm" value=""></td>
                <td><select class="form-control input-sm">
                    <option value="1">个</option>
                    <option value="2">千个</option>
                    <option value="3">百万个</option>
                </select>
                </td>
            </tr>
            <tr class="col-xs-14">
                <td>聚合水硼砂</td>
                <td><input type="text" class="form-control input-sm" value=""></td>
                <td><input type="text" class="form-control input-sm" value=""></td>
                <td><select class="form-control input-sm">
                    <option value="1">个</option>
                    <option value="2">千个</option>
                    <option value="3">百万个</option>
                </select>
                </td>
            </tr>
            <tr class="col-xs-14">
                <td>富杰斯贝矿</td>
                <td><input type="text" class="form-control input-sm" value=""></td>
                <td><input type="text" class="form-control input-sm" value=""></td>
                <td><select class="form-control input-sm">
                    <option value="1">个</option>
                    <option value="2">千个</option>
                    <option value="3">百万个</option>
                </select>
                </td>
            </tr>
            <tr class="col-xs-14">
                <td>聚合杰斯贝矿</td>
                <td><input type="text" class="form-control input-sm" value=""></td>
                <td><input type="text" class="form-control input-sm" value=""></td>
                <td><select class="form-control input-sm">
                    <option value="1">个</option>
                    <option value="2">千个</option>
                    <option value="3">百万个</option>
                </select>
                </td>
            </tr>
            <tr class="col-xs-14">
                <td>富希莫非特</td>
                <td><input type="text" class="form-control input-sm" value=""></td>
                <td><input type="text" class="form-control input-sm" value=""></td>
                <td><select class="form-control input-sm">
                    <option value="1">个</option>
                    <option value="2">千个</option>
                    <option value="3">百万个</option>
                </select>
                </td>
            </tr>
            <tr class="col-xs-14">
                <td>聚合希莫非特</td>
                <td><input type="text" class="form-control input-sm" value=""></td>
                <td><input type="text" class="form-control input-sm" value=""></td>
                <td><select class="form-control input-sm">
                    <option value="1">个</option>
                    <option value="2">千个</option>
                    <option value="3">百万个</option>
                </select>
                </td>
            </tr>
            <tr class="col-xs-14">
                <td>富同位原矿</td>
                <td><input type="text" class="form-control input-sm" value=""></td>
                <td><input type="text" class="form-control input-sm" value=""></td>
                <td><select class="form-control input-sm">
                    <option value="1">个</option>
                    <option value="2">千个</option>
                    <option value="3">百万个</option>
                </select>
                </td>
            </tr>
            <tr class="col-xs-14">
                <td>聚合同位原矿</td>
                <td><input type="text" class="form-control input-sm" value=""></td>
                <td><input type="text" class="form-control input-sm" value=""></td>
                <td><select class="form-control input-sm">
                    <option value="1">个</option>
                    <option value="2">千个</option>
                    <option value="3">百万个</option>
                </select>
                </td>
            </tr>
            <tr class="col-xs-14">
                <td>富灰岩</td>
                <td><input type="text" class="form-control input-sm" value=""></td>
                <td><input type="text" class="form-control input-sm" value=""></td>
                <td><select class="form-control input-sm">
                    <option value="1">个</option>
                    <option value="2">千个</option>
                    <option value="3">百万个</option>
                </select>
                </td>
            </tr>
            <tr class="col-xs-14">
                <td>聚合灰岩</td>
                <td><input type="text" class="form-control input-sm" value=""></td>
                <td><input type="text" class="form-control input-sm" value=""></td>
                <td><select class="form-control input-sm">
                    <option value="1">个</option>
                    <option value="2">千个</option>
                    <option value="3">百万个</option>
                </select>
                </td>
            </tr>
            <tr class="col-xs-14">
                <td>富黑褚石</td>
                <td><input type="text" class="form-control input-sm" value=""></td>
                <td><input type="text" class="form-control input-sm" value=""></td>
                <td><select class="form-control input-sm">
                    <option value="1">个</option>
                    <option value="2">千个</option>
                    <option value="3">百万个</option>
                </select>
                </td>
            </tr>
            <tr class="col-xs-14">
                <td>聚合黑褚石</td>
                <td><input type="text" class="form-control input-sm" value=""></td>
                <td><input type="text" class="form-control input-sm" value=""></td>
                <td><select class="form-control input-sm">
                    <option value="1">个</option>
                    <option value="2">千个</option>
                    <option value="3">百万个</option>
                </select>
                </td>
            </tr>
            <tr class="col-xs-14">
                <td>富片麻岩</td>
                <td><input type="text" class="form-control input-sm" value=""></td>
                <td><input type="text" class="form-control input-sm" value=""></td>
                <td><select class="form-control input-sm">
                    <option value="1">个</option>
                    <option value="2">千个</option>
                    <option value="3">百万个</option>
                </select>
                </td>
            </tr>
            <tr class="col-xs-14">
                <td>聚合片麻岩</td>
                <td><input type="text" class="form-control input-sm" value=""></td>
                <td><input type="text" class="form-control input-sm" value=""></td>
                <td><select class="form-control input-sm">
                    <option value="1">个</option>
                    <option value="2">千个</option>
                    <option value="3">百万个</option>
                </select>
                </td>
            </tr>
            <tr class="col-xs-14">
                <td>富克洛基石</td>
                <td><input type="text" class="form-control input-sm" value=""></td>
                <td><input type="text" class="form-control input-sm" value=""></td>
                <td><select class="form-control input-sm">
                    <option value="1">个</option>
                    <option value="2">千个</option>
                    <option value="3">百万个</option>
                </select>
                </td>
            </tr>
            <tr class="col-xs-14">
                <td>聚合克洛基石</td>
                <td><input type="text" class="form-control input-sm" value=""></td>
                <td><input type="text" class="form-control input-sm" value=""></td>
                <td><select class="form-control input-sm">
                    <option value="1">个</option>
                    <option value="2">千个</option>
                    <option value="3">百万个</option>
                </select>
                </td>
            </tr>
            <tr class="col-xs-14">
                <td>富双多特石</td>
                <td><input type="text" class="form-control input-sm" value=""></td>
                <td><input type="text" class="form-control input-sm" value=""></td>
                <td><select class="form-control input-sm">
                    <option value="1">个</option>
                    <option value="2">千个</option>
                    <option value="3">百万个</option>
                </select>
                </td>
            </tr>
            <tr class="col-xs-14">
                <td>聚合双多特石</td>
                <td><input type="text" class="form-control input-sm" value=""></td>
                <td><input type="text" class="form-control input-sm" value=""></td>
                <td><select class="form-control input-sm">
                    <option value="1">个</option>
                    <option value="2">千个</option>
                    <option value="3">百万个</option>
                </select>
                </td>
            </tr>
            <tr class="col-xs-14">
                <td>富艾克诺石</td>
                <td><input type="text" class="form-control input-sm" value=""></td>
                <td><input type="text" class="form-control input-sm" value=""></td>
                <td><select class="form-control input-sm">
                    <option value="1">个</option>
                    <option value="2">千个</option>
                    <option value="3">百万个</option>
                </select>
                </td>
            </tr>
            <tr class="col-xs-14">
                <td>聚合艾克诺石</td>
                <td><input type="text" class="form-control input-sm" value=""></td>
                <td><input type="text" class="form-control input-sm" value=""></td>
                <td><select class="form-control input-sm">
                    <option value="1">个</option>
                    <option value="2">千个</option>
                    <option value="3">百万个</option>
                </select>
                </td>
            </tr>
            <tr class="col-xs-14">
                <td>富基腹断岩</td>
                <td><input type="text" class="form-control input-sm" value=""></td>
                <td><input type="text" class="form-control input-sm" value=""></td>
                <td><select class="form-control input-sm">
                    <option value="1">个</option>
                    <option value="2">千个</option>
                    <option value="3">百万个</option>
                </select>
                </td>
            </tr>
            <tr class="col-xs-14">
                <td>聚合基腹断岩</td>
                <td><input type="text" class="form-control input-sm" value=""></td>
                <td><input type="text" class="form-control input-sm" value=""></td>
                <td><select class="form-control input-sm">
                    <option value="1">个</option>
                    <option value="2">千个</option>
                    <option value="3">百万个</option>
                </select>
                </td>
            </tr>
        </table>
    </div>
</div>
</body>
<script>
    $("input").on('input', function () {
        if ($(this).val()) {
            $(this).css('background-color', '#BFEFFF');
        } else {
            $(this).css('background-color', 'white');
        }
    });

    //计算价格
    function calcuate() {
        let array = [];
        $('tr').each(function (i) {
            let amount = $(this).children().eq(1).children("input:first-child").val();
            let price = $(this).children().eq(2).children("input:first-child").val();
            let unit = $(this).children().eq(3).children("select:first-child").val();
            if (amount && price) {
                array.push({'amount': amount, 'price': price, 'unit': unit});
            }
        });

        if (array.length === 0) {
            layer.msg("未输入任何数据");
            return;
        }
        $.ajax({
            url: domain + '/calcuate/do',
            type: 'get',
            dataType: 'json',
            data: {'query': JSON.stringify(array)},
            success: function (data) {
                if (data.code === 0) {
                    layer.alert('总价为:' + data.data);
                } else {
                    layer.msg(data.msg);
                }
            }
        })
    }

    //查看完美行星矿物
    function showPerfect(code) {
        $.ajax({
            url: domain + '/item/perfect',
            type: 'get',
            dataType: 'json',
            data: {'code': code},
            success: function (data) {
                if (data.code === 0) {
                    let list = data.data;
                    let content = '<table class="table table-bordered table-condensed table-striped"><tr><td>排名</td><td>位置</td><td>产量(每小时)</td></tr>';
                    for (let i = 0; i < list.length; i++) {
                        let item = list[i].split("|");
                        content += '<tr><td>' + (i + 1) + '</td>' + '<td>' + item[0] + '&nbsp;' + item[1] + '</td>' + '<td>' + item[2] + '</td></tr>'
                    }
                    content += '</table>';
                    layer.alert(content);
                } else {
                    layer.msg(data.msg);
                }
            }
        })
    }

    //售卖市场
    function toSell() {
        window.open(domain + '/page/sellList');
    }

    //求购市场
    function toBuy() {
        window.open(domain + '/page/buyList');
    }
    //显示table
    function showTable(id, btnid) {
        if ($("#"+id).css('display') === 'none') {
            $("#"+id).show();
            $("#"+btnid).attr('class', 'btn btn-primary');
        } else {
            $("#"+id).hide();
            $("#"+btnid).attr('class','btn btn-default');
        }
    }
</script>
</html>